package com.kevinwu.kevinwudemo.controller;

import com.kevinwu.framework.annotations.*;
import com.kevinwu.kevinwudemo.service.IKevinwuService;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

@KevinController
@KevinRequestMapping("/kevinwu")
public class KevinwuController {

    @KevinAutowired
    private IKevinwuService kevinwuService;

    /**
     * 调研service方法
     * @param request
     * @param response
     * @param username
     * @return
     */
    @KevinSecurity({"zhangsan","lisi"})
    @KevinRequestMapping("/sayhello")
    public String sayHello(HttpServletRequest request, HttpServletResponse response,String username){
        String str = kevinwuService.hello(username);
        return str;
    }

    @KevinSecurity({"wangwu","cailiu"})
    @KevinRequestMapping("/sayno")
    public String sayNo(HttpServletRequest request, HttpServletResponse response,String username){
        String str = kevinwuService.sayno(username);
        return str;
    }

}
